<template>
	
	<view class="content">
		<view class="yqr">
			<view class="sheader">我的邀请人：</view>
			<view class="sheader-saq">{{invite}}</view>
		</view>
		<view>
			<image :src="wz+erweima" class="code"/>
		</view>
		<button type="primary" class="no-border " @click="encourage">我的奖励</button>
		<button type="primary" class="no-borde " @click="recommend">我的推荐</button>

		<view class="xx1" >提示:如果需使用邀请二维码,请完成首次购物激活</view>


		</view>
</template>

<script>
	export default {
		data() {
        return {
           text:'我的邀请',
           erweima:'',
		   invite:'',
		   tel:'',
		   wz:'http://tuiguang.yiyunoto.com',
		  code:'',
        }
    },
	onLoad() {
		uni.request({
			url:'http://tuiguang.yiyunoto.com/api/member/mem_invite',
			header:{authtoken:this.$store.state.token},
			method:'POST',
			success:(res)=>{
				console.log("请求成功",res)
				this.erweima=res.data.data.erweima,
				this.invite=res.data.data.invite,
				this.tel=res.data.data.tel,
				this.code=res.data.code
			},
			fail:(res)=>{
				console.log("请求失败",res)
			}
		})
	},
    methods: {
        encourage(e) {
                console.log(e)
               	uni.navigateTo({
               		url:'../Invitation_record/Invitation_record'
               	})
            },
			recommend(e) {
			        console.log(e)
			       	uni.navigateTo({
			       		url:"../Invitation_Award/index"
			       	})
			    }
			
	},
	}
</script>

<style>
	.top {
		width: 100%;
		height: 0upx;
	}
	.top_nav {
		width: 100%;
		height: 100upx;
		position: absolute;
		top: 20upx;
		left: 20upx;
	}
	
	.top_left {
		magin: 20upx;
	
		float: left;
	}
	.content{
		width: 750upx;
		height:1623upx ;
		
	}
	.yao{
		text-align: center;
		padding-top: 20upx;
		box-sizing: border-box;
	}
	.tiao{
		width: 750upx;
		height:1upx ;
		background: #F1F1F1;
		margin-top: 40upx;
		margin-left: 0upx;
	}
	.img{
		width: 100%;
		height: 100%;
	}
	.yqr{
		position: absolute;
		top: 180upx;
		margin-left: 200upx;
	}
	.sheader{
		font-size:30upx ;
		float: left;
	}
	.sheader-saq{
		font-size: 30upx;
		float: left;
	}
	.sheader-saw{
		
			font-size: 30upx;
			float: left;
			color: red;
			 border-bottom: 1px solid red;
			
			
		
	}
		.code{
			width: 402upx;
			height: 402upx;
			position: relative;
			left:176upx ;
			top: 220upx;
			
		}
		.code1{
			width: 402upx;
			height: 402upx;
			position: relative;
			left:176upx ;
			top: 220upx;
			background: #404040;
		}
		.no-border {
			width:680upx ;
			height: 100upx;
			background:#42a8FF ;
			position: absolute;
			left:35upx ;
			top: 818upx;
			
	
		}
		.no-borde{
			width:680upx ;
			height: 100upx;
			position: absolute;
			left:35upx ;
			top: 935upx;
			color: #333333;
background:#F1F1F1;
		}
		.xx1{
			margin: 0 auto;
			color:#AEAEAE;
			font-size:30upx;
			width:680upx;
			position: absolute;
			left: 35upx;
			top: 1075upx;
			
		}
				 
</style>
